package PMIRPConstDefs;


/**
 * Generated from IDL struct "JobInfo".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public final class JobInfoHelper
{
	private static org.omg.CORBA.TypeCode _type = null;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			_type = org.omg.CORBA.ORB.init().create_struct_tc(PMIRPConstDefs.JobInfoHelper.id(),"JobInfo",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("job_id", PMIRPConstDefs.JobIdHelper.type(), null),new org.omg.CORBA.StructMember("mo_class", PMIRPConstDefs.MOClassNameHelper.type(), null),new org.omg.CORBA.StructMember("mo_instance_list", PMIRPConstDefs.MOInstanceListHelper.type(), null),new org.omg.CORBA.StructMember("measurement_category_list", PMIRPConstDefs.MeasurementCategoryListHelper.type(), null),new org.omg.CORBA.StructMember("granularity_period", PMIRPConstDefs.GranularityPeriodHelper.type(), null),new org.omg.CORBA.StructMember("reporting_period", PMIRPConstDefs.ReportingPeriodHelper.type(), null),new org.omg.CORBA.StructMember("start_time", PMIRPConstDefs.IRPTimeOptHelper.type(), null),new org.omg.CORBA.StructMember("stop_time", PMIRPConstDefs.IRPTimeOptHelper.type(), null),new org.omg.CORBA.StructMember("schedule", PMIRPConstDefs.ScheduleOptHelper.type(), null),new org.omg.CORBA.StructMember("job_status", PMIRPConstDefs.JobStatusHelper.type(), null),new org.omg.CORBA.StructMember("job_priority", PMIRPConstDefs.JobPriorityOptHelper.type(), null)});
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final PMIRPConstDefs.JobInfo s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static PMIRPConstDefs.JobInfo extract (final org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}

	public static String id()
	{
		return "IDL:PMIRPConstDefs/JobInfo:1.0";
	}
	public static PMIRPConstDefs.JobInfo read (final org.omg.CORBA.portable.InputStream in)
	{
		PMIRPConstDefs.JobInfo result = new PMIRPConstDefs.JobInfo();
		result.job_id=in.read_ulong();
		result.mo_class=in.read_string();
		result.mo_instance_list = PMIRPConstDefs.MOInstanceListHelper.read(in);
		result.measurement_category_list = PMIRPConstDefs.MeasurementCategoryListHelper.read(in);
		result.granularity_period=in.read_ulong();
		result.reporting_period=in.read_ulong();
		result.start_time=PMIRPConstDefs.IRPTimeOptHelper.read(in);
		result.stop_time=PMIRPConstDefs.IRPTimeOptHelper.read(in);
		result.schedule=PMIRPConstDefs.ScheduleOptHelper.read(in);
		result.job_status=PMIRPConstDefs.JobStatusHelper.read(in);
		result.job_priority=PMIRPConstDefs.JobPriorityOptHelper.read(in);
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final PMIRPConstDefs.JobInfo s)
	{
		out.write_ulong(s.job_id);
		out.write_string(s.mo_class);
		PMIRPConstDefs.MOInstanceListHelper.write(out,s.mo_instance_list);
		PMIRPConstDefs.MeasurementCategoryListHelper.write(out,s.measurement_category_list);
		out.write_ulong(s.granularity_period);
		out.write_ulong(s.reporting_period);
		PMIRPConstDefs.IRPTimeOptHelper.write(out,s.start_time);
		PMIRPConstDefs.IRPTimeOptHelper.write(out,s.stop_time);
		PMIRPConstDefs.ScheduleOptHelper.write(out,s.schedule);
		PMIRPConstDefs.JobStatusHelper.write(out,s.job_status);
		PMIRPConstDefs.JobPriorityOptHelper.write(out,s.job_priority);
	}
}
